package ui
{
	import flash.display.NativeWindow;
	import flash.display.NativeWindowInitOptions;
	import flash.display.NativeWindowSystemChrome;
	import flash.display.NativeWindowType;
	import flash.system.Capabilities;

	public class UISystemManager
	{
		public function UISystemManager() {}
		
		/**
		 * Create a Chromless Lightweight window.
		 */
		public static function createChromlessWindow(currentWindow:NativeWindow, windowWidth:int, windowHeight:int):NativeWindow {
			currentWindow.close();
			
			var options:NativeWindowInitOptions = new NativeWindowInitOptions();				
			
			options.type = NativeWindowType.NORMAL;
			options.systemChrome = NativeWindowSystemChrome.NONE;
			options.transparent = true;
			
			var window:NativeWindow = new NativeWindow(options);
			window.width = windowWidth;
			window.height = windowHeight;
			window.x = Capabilities.screenResolutionX - windowWidth - 10;
			window.y = 10;
			window.stage.align = "TL";
			window.stage.scaleMode = "noScale";
			
			window.activate();
			return window;
		}
	}
}